  <div class="pageheader">
      <h2><i class="fa fa-home"></i> Library Material </h2>
    </div>
    
    <div class="contentpanel">
       
      <div class="panel panel-default">
        <div class="panel-heading">
          <h4 class="panel-title"><strong> Add Library Material </strong></h4>
        </div>
		 <form action="<?php echo site_url("teacher").'/'.$this->uri->segment(2); ?>/library_material" method="post" class="form-horizontal form-bordered">
        <div class="panel-body panel-body">
			<div class="row">
			  <?php if($this->session->flashdata('message_board_added') !== false){
				?> <div class="alert alert-success fade in">
					<a href="#" class="close" data-dismiss="alert">&times;</a>
					<strong>Success!</strong> Data Submitted successfully.
				</div>
					<?php
				  } ?>
				<div class="col-md-4">
				  <h5 class="subtitle">Choose Board</h5>
					<div class="form-group">
						<?php $boards = $this->db->get_where('tbl_courses',array('type'=>'board'))->result_array(); ?>
						<select name="board" class="form-control chosen-select" data-placeholder="Choose a Board...">
						  <option value=""></option>
						  <?php foreach($boards as $board){ ?>
									  <option value="<?php echo $board['id'];?>"><?php echo $board['name'];?></option>
									  <?php } ?>
						</select>
					</div>
				</div><!-- col-md-4 -->
				<div class="col-md-4">
				  <h5 class="subtitle">Choose Class</h5>
					<div class="form-group">
					<?php $classes = $this->db->get_where('tbl_courses',array('type'=>'class'))->result_array(); ?>
						<select name="class" class="form-control chosen-select" data-placeholder="Choose a Class...">
						  <option value=""></option>
						  <?php foreach($classes as $class){ ?>
											<option value="<?php echo $class['id'];?>"><?php echo $class['name'];?></option>
									  <?php } ?>
						</select>
					</div>
				</div><!-- col-md-4 -->
				<div class="col-md-4">
				  <h5 class="subtitle">Choose Subject</h5>
					<div class="form-group">
						<?php $subjects = $this->db->get_where('tbl_courses',array('type'=>'subject'))->result_array(); ?>
									<select name="subject" class="form-control chosen-select" data-placeholder="Choose a Subject...">
						  <option value=""></option>
						  <?php foreach($subjects as $subject){ ?>
											<option value="<?php echo $subject['id'];?>"><?php echo $subject['name'];?></option>
									  <?php } ?>
						</select>
					</div>
				</div><!-- col-md-4 -->
			</div>
			<div class="row">
				<div class="panel-body">
				  <div class="col-md-8">
				  <h5 class="subtitle">Title to library</h5>
					<div class="form-group">
						<input type="text" name="title" class="form-control" placeholder="Title of library material"  />
					</div>
				</div><!-- col-md-4 -->
				</div>
			</div>
			<div class="row">
				<div class="panel-body">
				  <textarea id="wysiwyg" name="all" placeholder="Enter text here..." class="form-control" rows="10"></textarea>
				</div>
			</div>
			 		
        </div><!-- panel-body -->
        
        <div class="panel-footer">
			<div class="row">
				<div class="col-sm-6 col-sm-offset-3">
				  <button type="submit" name="submitted" class="btn btn-success">Submit</button>&nbsp;
				  <button class="btn btn-default">Cancel</button>
				</div>
			</div>
		</div><!-- panel-footer -->
        
				</form>
      </div><!-- panel -->  
    </div><!-- contentpanel -->
    
  </div><!-- mainpanel -->
 
  
</section>


<script src="<?php echo base_url();?>adm/js/jquery-1.10.2.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery-migrate-1.2.1.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery.cookie.js"></script>
<script src="<?php echo base_url();?>adm/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>adm/js/modernizr.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery.sparkline.min.js"></script>
<script src="<?php echo base_url();?>adm/js/toggles.min.js"></script>
<script src="<?php echo base_url();?>adm/js/retina.min.js"></script>
<script src="<?php echo base_url();?>adm/js/wysihtml5-0.3.0.min.js"></script>
<script src="<?php echo base_url();?>adm/js/bootstrap-wysihtml5.js"></script>
<script src="<?php echo base_url();?>adm/js/select2.min.js"></script>
<script src="<?php echo base_url();?>adm/js/custom.js"></script>
<script>
  jQuery(document).ready(function() {
    
	// Chosen Select
  jQuery(".chosen-select").select2();
	
	// HTML5 WYSIWYG Editor
  jQuery('#wysiwyg').wysihtml5({color: true,html:true});
  
  });
  
</script>

</body>
</html>
